<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>七牛测试</title>
     <script src="https://cdn.staticfile.org/Plupload/2.1.1/moxie.js"></script>
    <script src="https://cdn.staticfile.org/Plupload/2.1.1/plupload.dev.js"></script>
    <script src="https://cdn.staticfile.org/qiniu-js-sdk/1.0.14-beta/qiniu.js"></script>
    <script src="{{ url_for('static',filename='zlqiniu.js') }}"></script>
    <script>
        window.onload = function () {
            zlqiniu.setUp({
                'domain':'http://pv35x1lbx.bkt.clouddn.com/',
                'browse_button':'upload-btn',
                'uptoken_url':'/uptoken/',
                'success':function (up,file,info) {
                    var image_url = file.name
                    var imageInput = document.getElementById('image-input')
                    imageInput.value = image_url
                    var img = document.getElementById('images')
                    img.setAttribute('src',image_url)
                }
            })
        }
    </script>

</head>
<body>
    <button id="upload-btn">上传文件</button>
    <input type="text" id="image-input">
    <img src="" alt="美女" id="images">
</body>
</html>